const pool = require('../config/database');

class EnumModel {
  async getAllEnums(queryParams) {
    const sql = 'SELECT * FROM dict_data'
    const [rows] = await pool.query(sql);
    return rows;
  }

  async getAllEnumTypes(queryParams) {
    console.log('字典参数', queryParams);
    const sql = 'SELECT * FROM dict_type'
    const [rows] = await pool.query(sql);
    return rows;
  }
}

module.exports = new EnumModel();